package com.shop.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.shop.service.ShopService;
import com.shop.vo.Result;

//@RestController注解
@RestController
@RequestMapping("/h1")
public class ShopController {
	// @Autowired注解注入
	@Autowired
	private ShopService shopService;

	@PostMapping("/goods/list")
	public Result getGoodsList() {
		// 返回信息展示页面
		return new Result("true", "成功", shopService.getGoodsList());
	}
}
